package cn.z2huo.knowledge.function.functionprogram;

import lombok.extern.slf4j.Slf4j;

import java.util.stream.Stream;

/**
 * <p>
 *
 * @author z2huo
 */
@Slf4j
class ReduceTest {

    public static void main(String[] args) {
        Integer sum = Stream.of(1, 2, 3, 4).reduce((a, b) -> a + b).get();
        System.out.println(sum);
    }

}
